{
Alisa_Barkar
25/10/12 
}
program Pi;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  N, N0,i, j:integer;
  fout:textFile;
  x0, y0, R:real;
begin
  assignFile (fout, 'output.txt');
  rewrite(fout);
  for i:=1 to 10000 do
  begin
    N0:=0;
    N:=0;
    for j:=1 to 1000000 do
    begin
      randomize;
      x0:=2*random;
      y0:=2*random;
      if ((x0-1)*(x0-1)+(y0-1)*(y0-1)<=1) then
        N0:=N0+1;
      N:=N+1;
    end;
    if (N0 mod 10 = 0) then
    begin
      R:= Pi - (4*N0/N);
      writeln (fout, R, '  ', N);
    end;
  end;
  closeFile (fout);
end.
 